Optimal. Leaf size=37 \[ -\frac{a \cot (c+d x)}{d}-\frac{a \csc (c+d x)}{d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0934906, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.368, Rules used = {3872, 2838, 2621, 321, 207, 3767, 8} \[ -\frac{a \cot (c+d x)}{d}-\frac{a \csc (c+d x)}{d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2838
Rule 2621
Rule 321
Rule 207
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc ^2(c+d x) \sec (c+d x) \, dx\\ &=a \int \csc ^2(c+d x) \, dx+a \int \csc ^2(c+d x) \sec (c+d x) \, dx\\ &=-\frac{a \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}-\frac{a \operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac{a \cot (c+d x)}{d}-\frac{a \csc (c+d x)}{d}-\frac{a \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=\frac{a \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \cot (c+d x)}{d}-\frac{a \csc (c+d x)}{d}\\ \end{align*}
Mathematica [C] time = 0.0292145, size = 41, normalized size = 1.11 \[ -\frac{a \csc (c+d x) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\sin ^2(c+d x)\right )}{d}-\frac{a \cot (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.082, size = 47, normalized size = 1.3 \begin{align*} -{\frac{a\cot \left ( dx+c \right ) }{d}}-{\frac{a}{d\sin \left ( dx+c \right ) }}+{\frac{a\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01601, size = 68, normalized size = 1.84 \begin{align*} -\frac{a{\left (\frac{2}{\sin \left (d x + c\right )} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + \frac{2 \, a}{\tan \left (d x + c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.69994, size = 170, normalized size = 4.59 \begin{align*} \frac{a \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - a \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 2 \, a}{2 \, d \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \csc ^{2}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \csc ^{2}{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.53184, size = 68, normalized size = 1.84 \begin{align*} \frac{a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]